using Assets.Scripts.GDK;
using DG.Tweening;
using UnityEngine;

namespace Brick
{
	public class SkillTwoGuide : BaseGuideLayer
	{
		public RectTransform arrow;

		public RectTransform ListBox;

		public override void OnStart()
		{
			bindItemTouch();
			view.gameObject.SetActive(value: false);
			gdk_runTime.setTimeOut(delegate
			{
				view.gameObject.SetActive(value: true);
				showBtns();
			}, 1f);
		}

		private void showBtns()
		{
			Vector3 localPosition = arrow.localPosition;
			arrowMove(arrow, localPosition - new Vector3(50f, 0f, 0f), localPosition);
		}

		private void bindItemTouch()
		{
			GameObject gameObject = gdk_game_manager.loadPrefab(GuideID.ALERT);
			RectTransform component = gameObject.GetComponent<RectTransform>();
			gameObject.GetComponent<GuideAlert>().OnData(6);
			component.SetParent(box);
		}

		private void bindItemTouch2()
		{
			GameObject gameObject = gdk_game_manager.loadPrefab(GuideID.ALERT);
			RectTransform component = gameObject.GetComponent<RectTransform>();
			gameObject.GetComponent<GuideAlert>().OnData(7);
			component.SetParent(box);
			component.localPosition = new Vector2(0f, -300f);
		}

		public void OnTipTwoBtnClick()
		{
			gdk_game_manager.PlaySound(AudioID.click);
			OnTipTwoBtnAction();
		}

		private void OnTipTwoBtnAction()
		{
			gdk_utils.removeAllChildren(box);
			gdk_utils.removeAllChildren(view);
			bindItemTouch2();
			instantiateDisplayBox();
		}

		private void instantiateDisplayBox()
		{
		}

		private void PlayItemTween(GameObject item)
		{
			item.transform.DOShakeRotation(1f, new Vector2(10f, 10f), 10, 180f).SetLoops(1, LoopType.Incremental);
			item.transform.DOShakePosition(1f, new Vector2(10f, 10f), 10, -180f).SetLoops(1, LoopType.Incremental);
		}
	}
}

